package com.xy.smartsms.util;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by admin on 2017/5/8.
 */

public class Preference {
    public static long getLong(Context context, String key, long defaultValue) {
        SharedPreferences settings = context.getSharedPreferences("bizport_midware", Context.MODE_PRIVATE);
        return settings.getLong(key, defaultValue);
    }


    public static void putLong(Context context, String key, long value) {
        SharedPreferences settings = context.getSharedPreferences("bizport_midware", context.MODE_PRIVATE);
        SharedPreferences.Editor editor = settings.edit();
        editor.putLong(key, value);
        editor.commit();
    }
}
